package xcmg.device.dao.mapper.salesReturn;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import xcmg.device.dao.entity.salesReturn.SalesReturnApplyDetailDO;

import java.math.BigDecimal;
import java.util.List;

/**
 * Created by LiChangjiang on 2018/3/6 0006.
 */
@Mapper
public interface ReturnApplyDetailMapper
{
    List<SalesReturnApplyDetailDO> list(String applyId);

    int insert(SalesReturnApplyDetailDO applyDetailDO);

    SalesReturnApplyDetailDO itemById(@Param("id") String id);

    SalesReturnApplyDetailDO itemByNo(@Param("materialsNo") String materialsNo,@Param("applyId") String applyId);

    int updateReturnInStatus(@Param("id")String id, @Param("status")Integer status);

    int deleteByApply(String applyId);

    int update(SalesReturnApplyDetailDO applyDetailDO);

    int updateQty(@Param("qty") BigDecimal qty, @Param("saleNo") String saleNo, @Param("materialsNo") String materialsNo, @Param("orgId") String orgId);
}
